home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HiJaak Graphics Suite 3.0
/
HiJaak Graphics Suite V3.iso
/
inset
/
prolog.pdp
< prev
next >
Wrap
Text File
|
1992-11-14
|
11KB
|
548 lines
/PDDict 200 dict def
PDDict begin
%postscript proc redef
/bd { bind def } bind def
/ld { load def } bd
/xd { exch def } bd
%poscript graphic proc redef
/sg /setgray ld
/ssg { setseparationgray } def
/lw /setlinewidth ld
/lc /setlinecap ld
/lj /setlinejoin ld
/sd /setdash ld
/ml /setmiterlimit ld
/scfa { currentscreen 3 1 roll pop pop setscreen } bd
/negative
{ /trsfr1 currenttransfer def
{ 1 exch sub trsfr1 } bind
settransfer
} bd
/dotrnf
{ /trary exch def
/trsfr1 currenttransfer def
{ 255 mul cvi trary exch get 100 div trsfr1 } bind
settransfer
} bd
/$canPrint true def
/$overprint false def
/$spread 0 def
/$doTrap false def
/SetupPrint
{
PrintMode 1 le %Composite
{
/setcmykcolor where {pop}
{
/setcmykcolor
{ /$k xd 3 { 1 exch sub dup $k le {pop 0}{$k sub } ifelse 3 1 roll } bind repeat setrgbcolor } bd
} ifelse
/setcmykoverprint where {pop}
{
/setcmykoverprint
{ 4 { pop } repeat } bd
} ifelse
/setcolortransfer where {pop}
{
/setcolortransfer
{ 4 { pop } repeat } bd
} ifelse
} if
PrintMode 2 ge %4 Color Separation
{
/setcolortransfer where {pop}
{
/setcolortransfer
{
CurrentInk 0 eq
{
pop pop pop setransfer
}
{
CurrentInk 1 eq
{
pop pop settransfer pop
}
{
CurrentInk 2 eq
{
pop settransfer pop pop
}
{
CurrentInk 3 eq
{
settransfer pop pop pop
} if
} ifelse
} ifelse
} ifelse
} bd
} ifelse
/setcmykcolor where {pop}
{
/op
{
mul 5 1 roll mul 3 1 roll mul add add 0 eq
{
1 sg
}
{ /$canPrint false def } ifelse
} bd
/setcmykcolor
{
/$K xd /$Y xd /$M xd /$C xd
/$canPrint true def
/$doTrap false def
CurrentInk 0 eq
{
$C 0 eq {$M $oM $Y $oY $K dup 1 eq {$oK}{0} ifelse op }{1 $C sub sg } ifelse
}
{
CurrentInk 1 eq
{
$M 0 eq {$C $oC $Y $oY $K dup 1 eq {$oK}{0} ifelse op }{1 $M sub sg } ifelse
}
{
CurrentInk 2 eq
{
$Y 0 eq {$C $oC $M $oM $K dup 1 eq {$oK}{0} ifelse op }{1 $Y sub sg } ifelse
}
{
CurrentInk 3 eq
{
$K 0 eq {$C $oC $M $oM $Y $oY op }{1 $K sub sg } ifelse
}
{
$C $oC mul $M $oM mul $Y $oY mul $K $oK mul
add add add 0 eq
{
1 sg
}
{ /$canPrint false def } ifelse
}
ifelse
} ifelse
} ifelse
} ifelse
} bd
} ifelse
/setcmykoverprint where {pop}
{
/setcmykoverprint
{ /$oK xd /$oY xd /$oM xd /$oC xd } bd
} ifelse
} if
PrintMode 2 le
{
/findcmykcustomcolor where {pop}
{
/findcmykcustomcolor
{ pop
/$K xd /$Y xd /$M xd /$C xd
[ $C $M $Y $K ] } bd
} ifelse
/setcustomcolor where { pop }
{
/setcustomcolor
{
/$$i xd aload pop
4 { $$i mul 4 1 roll } repeat
setcmykcolor
} bd
}ifelse
/setoverprint where { pop } { /setoverprint /pop ld } ifelse
/currentoverprint where {pop} { /currentoverprint 0 def } ifelse
/setseparationgray where {pop} { /setseparationgray /setgray ld } ifelse
} if
PrintMode 3 eq %Full Color Separation
{
/findcmykcustomcolor where {pop}
{
/findcmykcustomcolor
{ CurrentInk eq 5 1 roll 4 { pop } repeat {[true]}{[false]} ifelse } bd
} ifelse
/setcustomcolor where { pop }
{
/setcustomcolor
{
/$canPrint true def
/$doTrap $spread 0 ge def
exch 0 get
{1 exch sub sg}
{
pop $overprint
/$doTrap false def
{/$canPrint false def}
{1 sg}
ifelse
} ifelse
} bd
}ifelse
/setoverprint where { pop } { /setoverprint {/$overprint xd} bd } ifelse
/currentoverprint where {pop} { /currentoverprint { $overprint } bd } ifelse
/setseparationgray where {pop} { /setseparationgray /setgray ld } ifelse
} if
} bd
false {
/p {
transform
0.25 sub round 0.25 add exch
0.25 sub round 0.25 add exch
itransform
} bd
/l { p lineto } bd
/mt { p moveto } bd
/c { p curveto } bd
}
{
/l /lineto ld
/c /curveto ld
/mt /moveto ld
} ifelse
/ovp { /$cop currentoverprint def setoverprint }def
/ovpe { $cop setoverprint } def
/np { newpath }bd
/cp /closepath ld
/gs /gsave ld
/gr /grestore ld
/sv { /pagesv save def } bd
/rs { pagesv restore } bd
/a /arc ld
/cir { 0 360 arc } bd % x y r cir -> circle
%GS procs
%colours
/K { findcmykcustomcolor exch setcustomcolor } def
/k { setcmykcolor } bd
%error messages
/msg1 (%%[ Error: PathLimitCheck; OffendingCommand: cl ]%%\n) def
/msg2 (%%[ Error: PathLimitCheck; OffendingCommand: fl ]%%\n) def
/msg3 (%%[ Error: PathLimitCheck; OffendingCommand: st ]%%\n) def
/_err {print flush newpath} bd
% eoclip; eofill; stroke functions which account for limitcheck errors:
/cl {
currentflat dup
{
gs
{eoclip} stopped
{
gr
2 mul dup setflat
dup 200 ge
{
pop
msg1 _err
exit
} if
}
{
gr
setflat
exit
}ifelse
} bind loop
eoclip
setflat
} bd
/fl {
$doTrap { gs $spread setlinewidth st gr } if
$canPrint
{
currentflat dup
{
gs
{eofill} stopped
{
gr
2 mul dup setflat
dup 200 ge
{
pop
msg2 _err
exit
} if
}
{
gr
setflat
exit
}ifelse
} bind loop
eofill
setflat
}
{newpath}
ifelse
} bd
/st {
$doTrap { currentlinewidth $spread add setlinewidth } if
$canPrint
{
currentflat dup
{
gs
{stroke} stopped
{
gr
2 mul dup setflat
dup 200 ge
{
pop
msg3 _err
exit
} if
}
{
gr
setflat
exit
}ifelse
} bind loop
stroke
setflat
}
{newpath}
ifelse
} bd
/bbox { /$t xd /$r xd /$b xd /$l xd $l $t mt $r $t l $r $b l $l $b l cp } bd
%linear interpolation r x0 x1 intp -> (x1-x0)r+x0
/intp { 3 -1 roll exch 2 index sub mul add } bd
%Gray scale gradfill
/bnd { np 0 $y1 mt 1 $y1 l 1 $y0 l 0 $y0 l cp fl /$y0 $y1 def } bd
/ffg {
dup 0 eq { pop 1 } if
/$n xd % numBands
/$k2 xd % endgray
/$e xd % endpercent
/$k1 xd % startgray
/$s xd % startpercent
/$y0 $s def
0 1 $n div 1
{
dup
$k1 $k2 intp sg
$s $e intp /$y1 xd
bnd
} for
} bd
/ffc {
dup 0 eq { pop 1 } if
/$n xd
/$ck2 xd /$cy2 xd /$cm2 xd /$cc2 xd
/$e xd
/$ck1 xd /$cy1 xd /$cm1 xd /$cc1 xd
/$s xd
/$y0 $s def
0 1 $n div 1
{
dup
$cc1 $cc2 intp 1 index
$cm1 $cm2 intp 2 index
$cy1 $cy2 intp 3 index
$ck1 $ck2 intp k
$s $e intp /$y1 xd
bnd
} for
} bd
/gf0 {
/$canPrint true def
/$b xd
/$an xd
/$a xd
/$b $b $an 1 sub div def
/$y0 0 def
$a 0 get /$y1 xd
$a 1 get sg bnd
2 2 $an 2 mul 1 sub
{
/$i xd
$y0
$a $i 1 sub get
$a $i get
$a $i 1 add get
$b
ffg
} for
/$y1 1 def
bnd
}bd
/gf1 {
/$b xd
/$an xd
/$a xd
/$b $b $an 1 sub div def
/$y0 0 def
$a 0 get /$y1 xd
$a 1 4 getinterval aload pop k bnd
5 5 $an 5 mul 1 sub
{
/$i xd
$y0
$a $i 4 sub 9 getinterval aload pop
$b ffc
} for
/$y1 1 def
bnd
} bd
/frg {
dup 0 eq { pop 1 } if
/$n xd
/$k2 xd
/$er xd
/$ey xd
/$ex xd
/$k1 xd
/$sr xd
/$sy xd
/$sx xd
0 1 $n div 1
{
/$i xd
$i $sx $ex intp
$i $sy $ey intp
$i $sr $er intp
$i $k1 $k2 intp sg
0 360 np arc cp fl
} for
} bd
/frc {
dup 0 eq { pop 1 } if
/$n xd
/$ck2 xd /$cy2 xd /$cm2 xd /$cc2 xd
/$er xd
/$ey xd
/$ex xd
/$ck1 xd /$cy1 xd /$cm1 xd /$cc1 xd
/$sr xd
/$sy xd
/$sx xd
0 1 $n div 1
{
/$i xd
$i $sx $ex intp
$i $sy $ey intp
$i $sr $er intp
$i $cc1 $cc2 intp
$i $cm1 $cm2 intp
$i $cy1 $cy2 intp
$i $ck1 $ck2 intp k
0 360 np arc cp fl
} for
} bd
/rf0 {
/$canPrint true def
/$b xd %number of bands
/$an xd %number of colors
/$a xd %percent/Color array
/$r2 xd
/$y2 xd
/$x2 xd
/$r1 xd
/$y1 xd
/$x1 xd
/$r $r1 def
/$x $x1 def
/$y $y1 def
/$b $b $an 1 sub div def
$a 1 get sg gs fl gr cl
0 2 $an 2 mul 3 sub
{
/$i xd
$x $y $r
$a $i 1 add get
/$p $a $i 2 add get def
/$x $p $x2 $x1 intp def
/$y $p $y2 $y1 intp def
/$r $p $r2 $r1 intp def
$x $y $r
$a $i 3 add get
$b frg
} for
} bd
/rf1 {
/$b xd %number of bands
/$an xd %number of colors
/$a xd %percent/Color array
/$r2 xd
/$y2 xd
/$x2 xd
/$r1 xd
/$y1 xd
/$x1 xd
/$r $r1 def
/$x $x1 def
/$y $y1 def
/$b $b $an 1 sub div def
$a 1 4 getinterval aload pop k gs fl gr cl
5 5 $an 5 mul 1 sub
{
/$i xd
$x $y $r
$a $i 4 sub 4 getinterval aload pop
/$p $a $i get def
/$x $p $x2 $x1 intp def
/$y $p $y2 $y1 intp def
/$r $p $r2 $r1 intp def
$x $y $r
$a $i 1 add 4 getinterval aload pop
$b frc
} for
} bd
/trs { translate rotate scale } bd
%array defined fountain fill [{ colordef percentPos}... ]
/gf { trs /$y0 0 def
{ exec /$y1 xd bnd } bind forall
} bd
/epss { /EPSsave save def
/showpage {} def
userdict begin
0 setgray 0 setlinecap 1 setlinewidth
0 setlinejoin 10 setmiterlimit [] 0 setdash
newpath
} bd
/epse { end EPSsave restore } bd
/sf { exch findfont exch scalefont setfont } bd
/smf { exch findfont exch makefont setfont } bd
/pp {{cvx exec} forall} bd
/pp1 { /$p exch def /$y xd /$x xd /$j xd /$i xd
$i { $j { $p pp 0 $y translate } repeat
$x $y neg $j mul translate } repeat } bd
/pp2 { /$p exch def /$b xd /$r xd /$t xd /$l xd
/$y xd /$x xd /$j xd /$i xd
$i { $j { gs np $l $t mt $r $t l $r $b l $l $b l cp cl
$p pp gr 0 $y translate } repeat
$x $y neg $j mul translate } repeat } bd